Web Technology and Its Applications by Chavan Prof. Pundalik & Tabassum Prof. Husna

Web Technology and Its Applications by Chavan Prof. Pundalik & Tabassum Prof. Husna

Author:Chavan, Prof. Pundalik & Tabassum, Prof. Husna [Chavan, Prof. Pundalik ]
Language: eng
Format: epub
Publisher: Nitya Publications, Bhopal
Published: 2021-05-30T16:00:00+00:00


Question Bank

1. What are super global arrays? With data flow diagrams, explain the role of PHP‟s $_ GET and$_POST arrays.

2. Explain $_SERVER associative array

3. Explain three approaches to restrict the file size in file upload with suitable code segments.

4. How do you read or write a file on the server from PHP? Give example.

5. Define constructor and discuss the concepts of inheritance, polymorphism and object interfacewith respect to OOP.

6. How do you achieve data encapsulation in PHP? Give example

7. What are Errors and Exceptions? Explain different Types of Errors

8. Explain Error Reporting in PHP

9. Explain procedural error handling and object oriented exception handing with suitable codeSegments.

10. Write a PHP program to create a class STUDENT with the following specification

Data members: Name, Roll number, Average marks

Member function: Read (getters) and write (setters)

Use the above specification to read and print the information of 2 students.

11. Write a PHP program to greet the user based on time.

12. Write a PHP program to demonstrate the session. Program: Store page view count on refresh

Module-5

Advanced JavaScript And JQuery 5.1 Managing State

A unique development problem for the web development problem is :”how can one request share information with another request?” Unlike the unified single process which is a typical desktop application, a web application consists of a series of disconnected HTTP request to the server where each request for a server page is essentially a request to run a separate program.

In HTTP, we can pass information using:

 Query strings

 Cookies

i) Passing Information Via Query Strings

A web page can pass query string information from the browser to the server using one of the two methods:

 a query string within the URL (GET)

 a query string within the HTTP header (POST).

Drawback:

The query string resulting after passing information will be long and

complicated.

ii) Passing Information Via TheUrl Path

the process of converting dynamic URL into static one and viceversa

is called dynamic rewriting.

5.2 Cookies

Cookies are a client-side approach for persisting state information.

They are name=value pairs that are saved within one or more text files

that are managed by the browser. These pairs accompany both server

requests and responses within the HTTP header. While cookies cannot

contain viruses, third-party tracking cookies have been a source of

concern for privacy advocates.

Two types of cookies:

i) Session cookies: A session cookie has no expiry stated and thus will

be deleted at the end of the user browsing session.

ii) Persistent cookies: Persistent cookies have an expiry date specified; they will persist in the browser‟s cookie file until the expiry date occurs, after which they are deleted.

Cookies in PHP are created using the setcookie() function and are retrieved using the $_COOKIES superglobal associative array.The setcookie() function also supports several more parameters, which further customize the new cookie.

Eg:

Uses of cookies:

i) to store user preferences.

ii) to track user‟s browsing behaviour

5.3 Serialization

Serialization is the process of taking a complicated object and reducing it down to zeros and ones for either storage or transmission. Later that sequence of zeros and ones can be reconstituted into the original object as illustrated in the figure below:

In PHP objects can easily be reduced down to a binary string using the serialize() function.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.